package com.szp.drug.component.service.api;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.szp.drug.entity.DrugSell;
import com.szp.drug.entity.DrugSellPage;
import com.szp.drug.util.ResultEntity;

import java.util.List;
import java.util.Map;

/**
 * 售出记录service接口
 * @author SuZePing
 * @create 2021-03-06 13:59
 * @E-mail suzeping10@126.com
 */
public interface DrugSellService extends IService<DrugSell> {

	/**
	 * 获取全部在售药品及器械
	 * @return
	 */
	ResultEntity<List<Map<String, Object>>> getAllOther();

	/**
	 * 获取药品或器械的单价
	 * @param otherId
	 * @return
	 */
	ResultEntity<String> getOtherPrice(String otherId);

	/**
	 * 分页获取售出记录
	 * @param sellName
	 * @param otherName
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	ResultEntity<PageInfo<DrugSellPage>> getPageInfo(String sellName, String otherName, String pageNum, String pageSize);

	/**
	 * 售出记录
	 * @param sell
	 * @return
	 */
	ResultEntity<Map<String,Object>> saveSell(DrugSell sell);

	/**
	 * 删除记录
	 * @param sellId
	 * @return
	 */
	ResultEntity<String> removeSell(String sellId);
}
